added samples
[windows-sources.git] / sdk / samples / all in on code / Visual Studio 2008 / VBWebBrowserAutomation / HtmlPassword.vb
blob31b30f3f1cc3dac5bdf49639a59d00f7ba91f9a4
1 '*************************** Module Header ******************************'
2 ' Module Name: HtmlPassword.vb
3 ' Project: VBWebBrowserAutomation
4 ' Copyright (c) Microsoft Corporation.
5 '
6 ' This class HtmlPassword represents an HtmlElement with the tag "input" and its
7 ' type is "password".
8 '
9 ' This source is subject to the Microsoft Public License.
10 ' See http://www.microsoft.com/opensource/licenses.mspx#Ms-PL.
11 ' All other rights reserved.
13 ' THIS CODE AND INFORMATION IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND,
14 ' EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE IMPLIED
15 ' WARRANTIES OF MERCHANTABILITY AND/OR FITNESS FOR A PARTICULAR PURPOSE.
16 '*************************************************************************'
18 Imports System.Security.Permissions
20 Public Class HtmlPassword
21 Inherits HtmlInputElement
24 Dim _value As String
25 Public Property Value() As String
26 Get
27 Return _value
28 End Get
29 Set(ByVal value As String)
30 _value = value
31 End Set
32 End Property
34 ''' <summary>
35 ''' This parameterless constructor is used in deserialization.
36 ''' </summary>
37 Public Sub New()
38 End Sub
40 ''' <summary>
41 ''' Initialize an instance of HtmlPassword. This constructor is used by
42 ''' HtmlInputElementFactory.
43 ''' </summary>
44 <PermissionSetAttribute(SecurityAction.LinkDemand, Name:="FullTrust")> _
45 Public Sub New(ByVal element As HtmlElement)
46 MyBase.New(element.Id)
47 Value = element.GetAttribute("value")
48 End Sub
50 ''' <summary>
51 ''' Set the value of the HtmlElement.
52 ''' </summary>
53 <PermissionSetAttribute(SecurityAction.LinkDemand, Name:="FullTrust")> _
54 Public Overrides Sub SetValue(ByVal element As HtmlElement)
55 element.SetAttribute("value", Value)
56 End Sub
57 End Class